package com.daz.common.component.entity;

import com.daz.common.component.constant.enums.ResponseEnum;
import lombok.Data;

/**
 * @description 响应VO
 * @author dingazheng
 * @since 2024/06/29
 */
@Data
public class ResponseVO<T> {
    private Integer code;
    private String message;
    private T data;

    public ResponseVO(ResponseEnum resultEnum) {
        this.code = resultEnum.getCode();
        this.message = resultEnum.getMessage();
    }
    public ResponseVO(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public ResponseVO(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
    public ResponseVO(T data) {
        this.data = data;
    }

}
